import akshare as ak


from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType

DOMAIN = "store"

async def async_setup(hass, config):
    hass.state.async_set("store.north_in_en",0)
    return True
# def setup_platform(hass, config, add_devices, discovery_info=None):
#     add_devices([AStockReportSensor()])

# class Store(Entity):
#     def __init__(self):
#         self._state = None

#     @property
#     def name(self):
#         return "store"

#     @property
#     def state(self):
#         return self._state

#     def update(self):
#         # 使用akshare获取A股收盘报告数据
#          # 北向净流入
#         north_in_en = ak.stock_hsgt_north_net_flow_in_em()
#         self._state = north_in_en.iloc[-1]

